import request from '@/utils/request'

// 查询工单信息
export function getWorkDetail(billNo) {
	return request({
		url: `/produce/produceOrder/getByBillNo/${billNo}`,
		method: 'get'
	})
}

// 查询物料与工单关联关系
export function getcheckSubMaterial(billNo, subMaterialId) {
	return request({
		url: `/produce/produceOrderDetail/checkSubMaterial/${billNo}/${subMaterialId}`,
		method: 'get'
	})
}
// 查询重量是否合格
export function getcheckWeighingWeigh(query) {
	return request({
		url: `/weighing/weighingMaster/checkWeighing`,
		method: 'get',
		params: query
	})
}



// 上传重量/主工单号子工单号/重量
export function updateCurrentWeight(query) {
	return request({
		url: `/weighing/weighingMaster/addWeighingDetail`,
		method: 'get',
		params: query
	})
}

// 上传重量/主工单号子工单号/重量/用户
export function updateCurrentWeightUser(userId,rawPassword) {
	return request({
		url: `/weighing/weighingMaster/matchesPassword/${userId}/${rawPassword}`,
		method: 'get',
	})
}




// 上传重量/主工单号子工单号
export function addWeighingDetail(billNo) {
	return request({
		url: `/weighing/weighingMaster/getWeighingMasterByBillNo/${billNo}`,
		method: 'get',
	})
}

// 完成/主工单号子工单号
export function weighingMasterFinished(billNo) {
	return request({
		url: `/weighing/weighingMaster/weighingMasterFinished/${billNo}`,
		method: 'get',
	})
}